
package IDE;

import javax.swing.JButton;
import javax.swing.JTextArea;


public class IDE extends javax.swing.JFrame {
private Controlador controlador;
   
    public IDE() {
        initComponents();
        controlador= new Controlador(this);
        Btn_Abrir.addActionListener(controlador);
        Btn_Guardar.addActionListener(controlador);
        Btn_ana.addActionListener(controlador);

    }

    public String getArea_escritura() {
        return area_escritura.getText();
    }

    public String getArea_analisis() {
        return area_analisis.getText();
    }

    public void setArea_analisis(String area_analisis) {
        this.area_analisis.setText(area_analisis);
        //this.area_escritura.getText()+"\n"+
    }

    public void setArea_escritura(String area_escritura) {
        this.area_escritura.setText(this.area_escritura.getText()+"\n"+area_escritura);
    }



   
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        Btn_Abrir = new javax.swing.JButton();
        Btn_Guardar = new javax.swing.JButton();
        Btn_ana = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        area_escritura = new javax.swing.JTextArea();
        jScrollPane2 = new javax.swing.JScrollPane();
        area_analisis = new javax.swing.JTextArea();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        Btn_Abrir.setText("Abrir");

        Btn_Guardar.setText("Guardar");

        Btn_ana.setText("Analizar");

        area_escritura.setColumns(20);
        area_escritura.setRows(5);
        jScrollPane1.setViewportView(area_escritura);

        area_analisis.setColumns(20);
        area_analisis.setEditable(false);
        area_analisis.setRows(5);
        area_analisis.setEnabled(false);
        jScrollPane2.setViewportView(area_analisis);

        jLabel1.setText("Escriba el Pseudo Código");

        jLabel2.setText("Análisis del Código:");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(Btn_ana)
                            .addComponent(Btn_Guardar))
                        .addGap(37, 37, 37)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 486, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 486, Short.MAX_VALUE)
                            .addComponent(jLabel1)
                            .addComponent(jLabel2)))
                    .addComponent(Btn_Abrir))
                .addContainerGap(54, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(Btn_Guardar)
                        .addGap(71, 71, 71))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(7, 7, 7)
                        .addComponent(Btn_Abrir)
                        .addGap(69, 69, 69)
                        .addComponent(Btn_ana)
                        .addContainerGap(145, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGap(32, 32, 32)
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(37, 37, 37))))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /*public JButton getBtn_Abrir() {
    return Btn_Abrir;
    }

    /*  public JButton getBtn_Guardar() {
    return Btn_Guardar;
    }

    public void setBtn_compi(JButton Btn_compi) {
    this.Btn_compi = Btn_compi;
    }
     */


    
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new IDE().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton Btn_Abrir;
    private javax.swing.JButton Btn_Guardar;
    private javax.swing.JButton Btn_ana;
    private javax.swing.JTextArea area_analisis;
    private javax.swing.JTextArea area_escritura;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    // End of variables declaration//GEN-END:variables

}
